<?php 
//notice
$array1 = array("a" => "green", "b" => "brown", "c" => "blue", 'blue', "red");
//$array1 = array("a" => "green", "b" => "brown", "c" => "blue", 'blue', "red", 'e' => array(1,2));
$array2 = array("b" => "yellow", "blue", "red","a" => "green", 'e' => 'dd');
$result_array = array_intersect($array1, $array2);
print_r($result_array); 